from config import Config
from utils.faiss_handler import BuitIndex
import numpy as np
import os
config = Config()
fais = BuitIndex(config)
# fais.bulit(rebulit=True)
files = os.listdir('./data/history')
print(files)
vecf = [i for i in files if 'vec.npy' in i][-1]
idsf = [i for i in files if 'ids.npy' in i][-1]
vec = np.load('./data/history/'+vecf)
ids = np.load('./data/history/'+idsf)
fais.add(vec,ids)
fais.save()
